Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2023
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. ; calc offset value, current work offset and g92/52 offset
  2. #<workoffset> = [#[5203 + #5220 * 20] + #5213 * #5210]
  3.  
  4. o200 if [#<_pv_ts_meas_length>]
  5.  
  6. o210 if [#<automode>]
  7. ; this is an auto mode call
  8. #<ztravel> = [-#<_ini[TOOLSENSOR]MAXPROBE>]
  9. o210 else
  10. ; manual mode
  11. o215 if [#<_pv_got_z>]
  12. #<ztravel> = #<_pv_z>
  13. o215 else
  14. #<ztravel> = #<_pv_ts_probe_overtravel>
  15. o215 endif
  16. o210 endif
  17.  
  18. o<_pm_ts_zprobe> call [#<ztravel>] [#<_pv_ts_ref_dia>] [#<_ini[TOOLSENSOR]XOFF>] [#<_ini[TOOLSENSOR]YOFF>] [#<tool_orient>] [#<tool_angle>]
  19. (print, _pm_ts_toolprobe z probe completed)
  20. o<_pm_check_error> call [#<pval>]
  21.  
  22. #<raw_result> = #[#<_pma_zpos>]
  23. o220 if [#<_tool_offset>]
  24. #<ztooloffset> = #5403
  25. o220 else
  26. #<ztooloffset> = 0
  27. o220 endif
  28.  
  29. #<touch_result> = [#<raw_result> + #<workoffset>]
  30.  
  31. (print, raw z: #<raw_result> workoffset: #<workoffset> ztooloffset: #<ztooloffset> touch_result: #<touch_result>)
  32.  
  33. o230 if [#<calmode>]
  34. #<th> = [#<touch_result> + #<ztooloffset> - #5403]
  35. #[#<_pma_cal_ts_height>] = #<th>
  36. #[#<_pma_cal_ts_zvalid>] = 1
  37. (print, Cal tool setter height: #<th>)
  38.  
  39. o230 else
  40. #<setterheight> = #[#<_pma_cal_ts_height>]
  41. o250 if [#<_pv_ts_exp_num>]
  42. G10.1 P[#<_pv_ts_exp_num>]
  43. #<experience_value> = #<_read_tool_table_diameter>
  44. o250 else
  45. #<experience_value> = 0
  46. o250 endif
  47.  
  48. #<tool_offset> = [#<touch_result> + #<ztooloffset> - #<setterheight> + #<experience_value>]
  49. (print, setterheight: #<setterheight> tool_offset: #<tool_offset>)
  50.  
  51. ; apply the offset if we are not using t0
  52. o255 if [#<_current_tool>]
  53. G10 L1 P[#<_current_tool>] Z[#<tool_offset>]
  54. o255 endif
  55. o230 endif
  56. o200 else
  57. ; not probing length so we need to move to the start location above the toolsetter
  58. #<zdelta> = [#[#<_pma_cal_ts_height>] + #<workoffset> - #<_z> + #<_pv_ts_latch_distance>]
  59. o290 if [#<_tool_offset>]
  60. o290 else
  61. #<zdelta> = [#<zdelta> + #5403]
  62. o290 endif
  63. (print, zdelta: #<zdelta>)
  64. G91 G1 Z[#<zdelta>] F[#<_pmm_rapid_feedrate>]
  65. o200 endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement